<?php
	mysql_connect("localhost", "ssdb", "ssdb") or die(mysql_error());
	mysql_select_db("ssdb");

$data_file =              "SSDB_Loots = {\n";
$sql = "SELECT * from loots";
$result = mysql_query($sql);
while($myrow = mysql_fetch_row($result)) {
	$data_file = $data_file . "     [" . ($myrow[0]+1) . "] = {\n";
	$data_file = $data_file . "          [\"loots_date\"] = " . $myrow[2] . ",\n";
	$data_file = $data_file . "          [\"players_name\"] = \"" . get_player_name($myrow[1]) . "\",\n";
	$data_file = $data_file . "          [\"items_id\"] = " . $myrow[3] . ",\n";
	$data_file = $data_file . "     },\n";
}
$data_file = $data_file . "}\n";
echo $data_file;
?>
